<extend name="common" />
<block name="main">
<div class="bd api-detail">
    <div class="panel panel-info">
        <div class="panel-heading">
            <h3 class="panel-title">删除项目</h3>
        </div>
        <div class="panel-body">
            <div class="alert alert-danger">
                删除项目将会连同其相关的所有数据（包括 接口、分组、成员等）会一起删除。请慎重考虑后进行操作。<br>
                <b>注意：此操作无法恢复!</b>
            </div>
            <div class="form-group">
                <a href="javascript:;" class="btn btn-danger btn-delproject">吾意已决,确定删除</a>
            </div>
        </div>
    </div>
</div>
<script>
$(function(){
    $('.btn-delproject').click(function(){
        if(confirm('删除后将无法恢复，确定要继续吗？')){
            var url = '{:U("Home/Project/deleteProject",["pid"=>$project_id,"aid"=>$api[api_id]])}';
            $.post(url,{pid:{$project_id}},function(rs){
                if(rs.success){
                    showMessage('success',rs.msg,rs.url);
                }
                else{
                    showMessage('erroe',rs.msg,rs.url);
                }
            })
        }
    })
})
</script>
</block>